cmake_minimum_required(VERSION 3.22)

# 本CMakeLists.txt的project名称
# 会自动创建两个变量，PROJECT_SOURCE_DIR和PROJECT_NAME
# ${PROJECT_SOURCE_DIR}：本CMakeLists.txt所在的文件夹路径
# ${PROJECT_NAME}：本CMakeLists.txt的project名称
project(ndk)

set(CMAKE_CXX_STANDARD 17)

# 如果想要生成的可执行文件拥有符号表，可以gdb调试，就直接加上这句
add_definitions("-Wall -g")
# 设置变量，下面的代码都可以用到
set(CONST_DIR ${PROJECT_SOURCE_DIR}/const)
set(CONSTEXPR_DIR ${PROJECT_SOURCE_DIR}/constexpr)
set(DEFINE_DIR ${PROJECT_SOURCE_DIR}/宏)

# 编译子文件夹的CMakeLists.txt
#add_subdirectory(宏)
include_directories(
        ${CONST_DIR}
        ${CONSTEXPR_DIR}
        ${DEFINE_DIR}
)

add_executable(constCpp const/const.cpp)
add_executable(constC const/const.c)
add_executable(constexpr constexpr/constexpr.cpp)
add_executable(${PROJECT_NAME} main.cpp)
#target_link_libraries(${PROJECT_NAME} 宏)
add_executable(main 优先级与结合性/main.cpp)


add_executable(arraypointer arraypointer.c jni/jnitest.c jnitest/自减.h jnitest/test.c jnitest/main.c)


add_executable(myfirst cplus/day1/myfirst.cpp)
add_executable(my 结构体/01.c)
add_executable(struct 结构体/01.cpp)
add_executable(exam2 exam2/arrays.c)
add_executable(zhouzhou exam2/zhouzhou.c)
add_executable(memory 动态内存分配/lsen1.c)
add_executable(file file/filetest.c)

add_executable(address 虚拟地址/address.c)

add_executable(cplus cplus/引用/test.cpp)
add_executable(defaultcanshu 自增自减/自减.cpp)

add_executable(poniter 指针/函数指针/pointer.c)

add_executable(class cplus/类/test.cpp cplus/类/src/Person.cpp)
add_executable(constant cplus/常量修饰符/constant.cpp)

add_executable(use 运算符重载/mytime.h 运算符重载/mytime.cpp 运算符重载/test.cpp)

add_executable(biter  重载/Person.cpp 重载/test.cpp)

add_executable(time 复制与拷贝/main.cpp 复制与拷贝/mytime.cpp)
